<!--
 * @Author: your name
 * @Date: 2021-12-06 16:44:59
 * @LastEditTime: 2022-08-12 15:50:19
 * @LastEditors: yuSun
-->
<template>
  <AppTopnav/>
  <AppHeader />
  <AppHeaderSticky/>
  <main class="app-body">
    <!-- 二级路由 -->
    <router-view></router-view>
  </main>
  <!--  -->
  <!--  底部组件 -->
<AppFooter/>
</template>

<script>
import AppTopnav from '@/components/app-topnav'
import AppHeader from '@/components/app-header'
import AppFooter from '@/components/app-footer'
import AppHeaderSticky from '@/components/app-header-sticky'
import { useStore } from 'vuex'
export default {
  name: 'Layout',
  components: { AppTopnav, AppHeader, AppFooter, AppHeaderSticky },
  setup () {
    // 获取分类数据
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style scoped lang='less'>
.app-body {
  min-height: 600px;
}
</style>
